1. Field of the Invention
The present invention relates to an input circuit for connection to an NPN switching element and a PNP switching element.
2. Description of the Related Art
On/off sensors such as proximity switches or the like employ a transistor as a switching element and have an output circuit with an open collector of the transistor. Since transistors are available as NPN and PNP transistors, input circuits of devices to which proximity switches are connected should preferable be connectable to both NPN and PNP transistors. For example, there has been proposed an input circuit 100 as shown in FIG. 3A of the accompanying drawings.
As shown in FIG. 3A, the input circuit 100 includes an AC (Alternating Current)-input photocoupler 102 having an input terminal 102a connected through a resistor 104 to an external terminal 106a and another input terminal 102b connected to an external terminal 106b. The input circuit 100 also has a resistor 108 connected between the input terminals 102a, 102b parallel thereto.
For connecting an NPN transistor 110 as a switching element to the input circuit 100, the collector of the transistor 110 is connected to the external terminal 106a and the emitter thereof is connected to ground G, and a positive electrode V is connected to the external terminal 106b. 
As shown in FIG. 3B of the accompanying drawings, for connecting a PNP transistor 112 as a switching element to the input circuit 100, the collector of the transistor 112 is connected to the external terminal 106a and the emitter thereof is connected to the positive electrode V, the external terminal 106b is connected to ground G.
There has also been proposed an input circuit using both NPN and PNP transistors for the purpose of increasing the input range thereof (see, for example, Japanese laid-open patent publication No. 10-247846).
The input circuit 100 shown in FIGS. 3A and 3B, allows either the NPN transistor 110 or the PNP transistor 112 to be connected thereto, but prevent both the NPN transistor 110 and the PNP transistor 112 from being simultaneously connected thereto.
The external terminal 106b needs to be selectively connected to the positive electrode V and ground G when the NPN transistor 110 is connected and when the PNP transistor 112 is connected.
The input circuit disclosed in Japanese laid-open patent publication No. 10-247846 is of a simple arrangement. The NPN transistor and the PNP transistor in the disclosed input circuit operate as an emitter follower, and are not switching elements to be connected through external circuits. Therefore, the input circuit cannot be used as an input circuit for external switching elements.